<%@ page contentType="text/html; charset=utf-8" %>
<%@ taglib prefix="s" uri="/struts-tags" %>

<h2 class="page_title"><strong>이벤트 게시판</strong></h2>
<s:if test="#session.session_id==null">
	<p><strong>로그인</strong>을 하셔야 게시물을 열람하실 수 있습니다. </p>
</s:if>
<s:else>
	<div>
		<!-- 검색부분 -->
		<form class="align_r">
			<select name="searchNum">
				<option value="0">작성자</option>
				<option value="1">제목</option>
				<option value="2">내용</option>
			</select>
			<s:textfield name="searchKeyword" theme="simple" value="" cssStyle="width:120px" maxlength="20" />
			<input name="submit" type="submit" value="검색" class="inputb">
		</form>
	</div>
</s:else>
 
<s:iterator value="list" status="stat">
<div class="event_modul">
	<s:url id="viewURL" action="EviewAction" >
		<s:param name="no">
			<s:property value="no" />
		</s:param> 
		<s:param name="currentPage">
			<s:property value="currentPage" />
		</s:param>
	</s:url>
	<div class="image">
		<s:if test="file_savname == null">
			
			 <s:if test="#session.session_id==null">
		    	<p class="align_c noImg">?</p>
		    </s:if>
		    <s:else>
		    	<s:a href ="%{viewURL}">
				<p class="align_c noImg">?</p>
				</s:a> 
		    </s:else>
		</s:if>
		<s:else>
		    <s:if test="#session.session_id==null">
		    	<img src="C:\\project_file\\eventboard\\<s:property value="file_savname"/>" />
		    </s:if>
		    <s:else>
		    	<s:a href ="%{viewURL}">
				<img src="C:\\project_file\\eventboard\\<s:property value="file_savname"/>" />
				</s:a> 
		    </s:else>
		</s:else>
	</div><!-- image -->
	<div class="text">
		<p class="align_r">
			<b>DATE</b> : <s:property value="regdate" />
		</p>
		<p class="align_r">
			<b>VIEWS</b> : <s:property value="readhit" />
		</p>
		<dl>
			<dt>EVENT NAME</dt>
			<dd><s:property value="subject"/></dd>
			<dt>MACHMAKER</dt>
			<dd><s:property value="nickname"/></dd>
			<dt>MAN COUNT</dt>
			<dd>now : <s:property value="man_count"/> / max: <s:property value="manmax" /></dd>
			<dt>LADY COUNT</dt>
			<dd>now : <s:property value="lady_count"/> / max: <s:property value="ladymax" /></dd>
			<dt>EVENTDATE</dt>
			<dd><s:property value="eventdate" /></dd>
		</dl>
	</div><!-- text -->
</div><!-- event_modul -->
</s:iterator>

    <s:if test="list.size() <= 0">
    	<p class="align_c mar_b_20">등록된 게시물이 없습니다</p>
</s:if>
<p class="align_c"><s:property value="pagingHtml" escape="false" /></p>
<s:if test="#session.session_id != null">
<p class="align_r"><input type="button" value="글쓰기" class="inputb" onClick="javascript:location.href='EwriteForm.action?currentPage=<s:property value="currentPage" />';"></p>
   </s:if>